<template>
  <div class="netdisk-landing">
    <AppHeader functionName="云檐藏阁" theme="light" maxWidth="100%"></AppHeader>
    <!-- 背景图形元素 -->
    <div class="bg-elements">
      <div class="shape shape-1"></div>
      <div class="shape shape-2"></div>
      <div class="shape shape-3"></div>
      <div class="shape shape-4"></div>
    </div>

    <!-- 主要内容区域 -->
    <div class="landing-container">
      <!-- 左侧内容 -->
      <div class="left-content">
        <h1 class="title">云檐藏阁</h1>
        <p class="subtitle">智能云存储，安全管理，便捷分享</p>
        <div class="description">
          <p>「云檐藏阁」是您的个人云端仓库，为您提供安全可靠的文件存储、智能管理与便捷分享服务。无论何时何地，轻松访问您的所有文件。</p>
        </div>
        <div class="action-buttons">
          <el-button type="primary" size="large" @click="navigateToExplorer" class="start-button">
            <el-icon class="button-icon"><ArrowRight /></el-icon>
            开始体验
          </el-button>
        </div>
      </div>

      <!-- 右侧图形展示 -->
      <div class="right-content">
        <div class="feature-illustration">
          <div class="floating-folder folder-1">
            <el-icon><FolderOpened /></el-icon>
            <span>文档</span>
          </div>
          <div class="floating-folder folder-2">
            <el-icon><Picture /></el-icon>
            <span>图片</span>
          </div>
          <div class="floating-folder folder-3">
            <el-icon><VideoPlay /></el-icon>
            <span>视频</span>
          </div>
          <div class="floating-folder folder-4">
            <el-icon><Files /></el-icon>
            <span>文件</span>
          </div>
          <div class="center-circle">
            <el-icon><Connection /></el-icon>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { FolderOpened, ArrowRight,Picture, VideoPlay, Files, Connection } from '@element-plus/icons-vue'

const router = useRouter()

// 导航到文件浏览器页面
const navigateToExplorer = () => {
  router.push('/file/explorer')
}
</script>

<style lang="scss" scoped>
.netdisk-landing {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  
  // 背景图形元素
  .bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    
    .shape {
      position: absolute;
      border-radius: 50%;
      opacity: 0.5;
      
      &.shape-1 {
        width: 400px;
        height: 400px;
        background: linear-gradient(135deg, #3498db, #1e88e5);
        top: -200px;
        right: -100px;
        filter: blur(80px);
      }
      
      &.shape-2 {
        width: 300px;
        height: 300px;
        background: linear-gradient(135deg, #4caf50, #8bc34a);
        bottom: -150px;
        left: -150px;
        filter: blur(60px);
      }
      
      &.shape-3 {
        width: 200px;
        height: 200px;
        background: linear-gradient(135deg, #9c27b0, #673ab7);
        top: 50%;
        left: 15%;
        filter: blur(50px);
        opacity: 0.3;
      }
      
      &.shape-4 {
        width: 250px;
        height: 250px;
        background: linear-gradient(135deg, #ff9800, #f44336);
        bottom: 20%;
        right: 10%;
        filter: blur(60px);
        opacity: 0.2;
      }
    }
  }
  
  // 主容器
  .landing-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 120px;
    min-height: 80vh;
    
    @media (max-width: 1200px) {
      flex-direction: column;
      padding: 60px 40px;
      text-align: center;
    }
  }
  
  // 左侧内容
  .left-content {
    flex: 1;
    max-width: 550px;
    
    @media (max-width: 1200px) {
      max-width: 100%;
      margin-bottom: 60px;
    }
    
    .title {
      font-size: 56px;
      font-weight: bold;
      color: #222;
      margin-bottom: 16px;
      font-family: "STXihei", "华文细黑", sans-serif;
      background: linear-gradient(135deg, #3578e5, #1a237e);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      text-fill-color: transparent;
    }
    
    .subtitle {
      font-size: 24px;
      color: #444;
      margin-bottom: 24px;
      font-family: "STKaiti", "楷体", serif;
    }
    
    .description {
      margin-bottom: 40px;
      
      p {
        font-size: 16px;
        line-height: 1.8;
        color: #666;
        font-family: "STKaiti", "楷体", serif;
      }
    }
    
    .action-buttons {
      display: flex;
      gap: 16px;
      
      @media (max-width: 768px) {
        flex-direction: column;
        align-items: center;
      }
      
      .start-button {
        background: linear-gradient(135deg, #3578e5, #1a237e);
        border: none;
        padding: 12px 36px;
        font-size: 16px;
        font-weight: bold;
        box-shadow: 0 8px 16px rgba(53, 120, 229, 0.3);
        transition: all 0.3s ease;
        
        &:hover {
          transform: translateY(-3px);
          box-shadow: 0 12px 20px rgba(53, 120, 229, 0.4);
        }
        
        .button-icon {
          margin-right: 8px;
        }
      }
    }
  }
  
  // 右侧图形展示
  .right-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    
    .feature-illustration {
      position: relative;
      width: 500px;
      height: 500px;
      @media (max-width: 1200px) {
        width: 460px;
        height: 460px;
      }
      
      .center-circle {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100px;
        height: 100px;
        background: linear-gradient(135deg, #3578e5, #1a237e);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 15px 30px rgba(26, 35, 126, 0.4);
        z-index: 2;
        
        .el-icon {
          font-size: 40px;
          color: white;
        }
      }
      
      .floating-folder {
        position: absolute;
        padding: 20px;
        background: white;
        border-radius: 20px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        animation: float 6s infinite ease-in-out;
        width: 120px;
        height: 120px;
        
        .el-icon {
          font-size: 40px;
          margin-bottom: 10px;
        }
        
        span {
          font-size: 18px;
          font-weight: bold;
        }
        
        &.folder-1 {
          top: 12%;
          left: 10%;
          animation-delay: 0s;
          
          .el-icon {
            color: #2C6BED;
          }
        }
        
        &.folder-2 {
          top: 12%;
          right: 10%;
          animation-delay: 1.5s;
          
          .el-icon {
            color: #4CAF50;
          }
        }
        
        &.folder-3 {
          bottom: 12%;
          right: 10%;
          animation-delay: 3s;
          
          .el-icon {
            color: #AB4CDB;
          }
        }
        
        &.folder-4 {
          bottom: 12%;
          left: 10%;
          animation-delay: 4.5s;
          
          .el-icon {
            color: #FF9800;
          }
        }
      }
    }
  }
}
// 浮动动画
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}
</style>